﻿using Stardust.Server;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebServer2
{
    public class Ps
    {
        public double X { get; set; }
        public double Y { get; set; }
    }

    [StardustName(Description = "计算器")]
    public class CalcService : IStardustService
    {

        [StardustName(Description = "计算两个数相加")]
        public double add(Ps ps)
        {
            return ps.X + ps.Y;
        }

        public double reduce(Ps ps)
        {
            return ps.X - ps.Y;
        }

        public double multiply(Ps ps)
        {
            return ps.X * ps.Y;
        }

        public double divide(Ps ps)
        {
            return ps.X / ps.Y;
        }

    }
}